<?php

use Illuminate\Routing\Router;
use Illuminate\Support\Facades\Route;
use Dcat\Admin\Admin;
use Studio\Totem\Http\Controllers\DashboardController;

Admin::routes();

Route::group([
    'prefix'     => config('admin.route.prefix'),
    'namespace'  => config('admin.route.namespace'),
    'middleware' => config('admin.route.middleware'),
], function (Router $router) {

    $router->get('/', 'HomeController@index');

    $router->any('/visitor/images', 'ImageController@handle');

    Route::resource('/visitors', 'VisitorController');
    Route::resource('/intervieweeInformation', 'IntervieweeInformationController');
    Route::resource('/config', 'ConfigController');
    Route::resource('/reserves', 'ReservesController');
    Route::resource('/visitor_reserves_log', 'VisitorReservesLogController');
    Route::resource('/visitor_approval_log', 'VisitorApprovalLogController');



    // $router->match(['post','get'],'/visitors/images', 'ImageController@handle');
});



// Route::get('/totem', 'Studio\\Totem\\Http\\Controllers\\DashboardController@index')->name('totem.dashboard');
//
// Route::group([
//     'prefix' => 'tasks',
//     'namespace' => 'Studio\\Totem\\Http\\Controllers',
// ], function () {
//
//
//     Route::get('/', 'TasksController@index')->name('totem.tasks.all');
//
//     Route::get('create', 'TasksController@create')->name('totem.task.create');
//     Route::post('create', 'TasksController@store');
//
//     Route::get('export', 'ExportTasksController@index')->name('totem.tasks.export');
//     Route::post('import', 'ImportTasksController@index')->name('totem.tasks.import');
//
//     Route::get('{task}', 'TasksController@view')->name('totem.task.view');
//
//     Route::get('{task}/edit', 'TasksController@edit')->name('totem.task.edit');
//     Route::post('{task}/edit', 'TasksController@update');
//
//     Route::delete('{task}', 'TasksController@destroy')->name('totem.task.delete');
//
//     Route::post('status', 'ActiveTasksController@store')->name('totem.task.activate');
//     Route::delete('status/{id}', 'ActiveTasksController@destroy')->name('totem.task.deactivate');
//
//     Route::get('{task}/execute', 'ExecuteTasksController@index')->name('totem.task.execute');
// });







